"use strict" // Use strict JavaScript mode

// Pull in the modules we're going to use
var cocos = require('cocos2d') // Import the cocos2d module
, nodes = cocos.nodes // Convenient access to 'nodes'
, events = require('events') // Import the events module
, geo = require('geometry') // Import the geometry module
, ccp = geo.ccp

// Convenient access to some constructors
var Layer = nodes.Layer, Scene = nodes.Scene, Label = nodes.Label, Director = cocos.Director

var MapContainer = require('/MapContainer').MapContainer;



/**
 * Entry point for the application
 */
function main() {
	// Initialise application

	// Get director singleton
	var director = Director.sharedDirector

	// Wait for the director to finish preloading our assets
	events.addListener(director, 'ready', function(director) {
		// Create a scene and layer
		var scene = new Scene();
		var mapLayer=new MapContainer(); 
		// Add our layer to the scene
		scene.addChild(mapLayer);
		
		// Run the scene
		director.replaceScene(scene);
		director.displayFPS=true;
	})

	// Preload our assets
	director.runPreloadScene()
	
	
}

exports.main = main
